<meta charset="utf-8" />
<script>
    var dan = prompt("请您输入一个英文单词");

    if(dan=="pig"){
        document.write("猪");
    }else if(dan=="dog"){
        document.write("狗");
    }else if(dan=="cat"){
        document.write("猫")
    }else{
        document.write("暂无该单词");
    }
</script>